﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.ComponentModel;

namespace Oroboros.Save_Data
{
    [XmlInclude(typeof(UmbrellaSkillSaveData))]
    public class SkillSaveData : INotifyPropertyChanged
    {
        private int _DailySuccessCount;
        private int _Level = 1;
        private string _SkillClassName = string.Empty;

        public int DailySuccessCount { get { return _DailySuccessCount; } set { Changed("DailySuccessCount"); _DailySuccessCount = value; } }
        public int Level { get { return _Level; } set { Changed("Level"); _Level = value; } }
        public string SkillClassName { get { return _SkillClassName; } set { Changed("SkillClassName"); _SkillClassName = value; } }

        public event PropertyChangedEventHandler PropertyChanged;
        public void Changed(string n)
        {
            if (PropertyChanged == null) return;
            if (!string.IsNullOrEmpty(n))
                PropertyChanged(this, new PropertyChangedEventArgs(n));
        }
    }
}
